package labeledbox;

import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import javax.swing.border.*;
  
class LabeledBoxApplication extends JFrame {
    
  DrawPanel         drawingPanel;
  LabelBoxControls  newBoxControls;
  FontControls      fontControls;
  AnimationControls animationControls;

  // Constructor
  public LabeledBoxApplication() {

    drawingPanel = new DrawPanel();
    drawingPanel.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));

    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    JPanel contentPane = (JPanel)this.getContentPane();
    contentPane.add(drawingPanel, BorderLayout.CENTER);

    newBoxControls = new LabelBoxControls(drawingPanel);
    contentPane.add(newBoxControls, BorderLayout.WEST);
    newBoxControls.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));

    JPanel topControls = new JPanel(new GridLayout(0,2));
    contentPane.add(topControls, BorderLayout.NORTH);

    fontControls = new FontControls(drawingPanel);
    topControls.add(fontControls);
    fontControls.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));

    animationControls = new AnimationControls(drawingPanel);
    topControls.add(animationControls);
    animationControls.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED));

    this.pack();
    this.setVisible(true);
  } //// end constructor ////

  
  // MAIN
  public static void main(String args[]) {
    new LabeledBoxApplication();
  }

} /////////////////////////// end class ////////////
